

public class MovePerformer {
	
	private Piece piece;
	private BoardMove move;
	
	public MovePerformer(Piece piece, BoardMove move) {
		this.piece = piece;
		this.move = move;
	}
	
	public void performMove() {
		System.out.println("Move chosen: " + getMove().toString());
		piece.move(move.getToFile(), move.getToRank(), move.getPromoteType());
	}
	
	public Piece getPiece() {
		return piece;
	}
	
	public BoardMove getMove() {
		return move;
	}
	
	@Override
	public String toString() {
		return getPiece().getKindString() + " - " + getMove().toString();
	}
	
}
